package com.it.reggie.entity;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 订单
 */
@ApiModel("订单")
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Orders implements Serializable {

    private static final long serialVersionUID = 1L;

    @ExcelIgnore
    private Long id;

    //订单号
    @ExcelProperty("订单号")
    private String number;

    //下单用户id
    @ExcelIgnore
    private Long userId;

    //地址id
    @ExcelIgnore
    private Long addressBookId;

    //支付方式 1微信，2支付宝
    @ExcelIgnore
    private Integer payMethod;

    //实收金额
    @ExcelProperty("实收金额")
    private BigDecimal amount;

    //备注
    @ExcelIgnore
    private String remark;

    //用户名
    @ExcelProperty("用户名")
    private String userName;

    //收货人
    @ExcelProperty("收货人")
    private String consignee;
    @ExcelProperty("手机号")

    //手机号
    private String phone;

    //地址
    @ExcelProperty("地址")
    private String address;


    //订单状态 1待付款，2待派送，3已派送，4已完成，5已取消
    @ExcelIgnore
    private Integer status;

    //下单时间
    @ExcelProperty("下单时间")
    private LocalDateTime orderTime;

    //结账时间
    @ExcelIgnore
    private LocalDateTime checkoutTime;

    @ExcelProperty("订单状态")
    @TableField(exist = false)
    private String statusStr;


}
